package com.rp.configure.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalTime;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author vicente
 * @since 2021-07-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="Alarm对象", description="")
public class Alarm extends Model<Alarm> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "开始时间，有开始必须有结束")
    private LocalTime startTime;
    @ApiModelProperty(value = "延时时间(分钟)")
    private Integer delayTime;
    @ApiModelProperty(value = "结束时间，有结束必须有开始")
    private LocalTime endTime;

    @ApiModelProperty(value = "值的类型（0，布尔，1其他）")
    private Integer valueType;
    @ApiModelProperty(value = "类型（0单个，1全局）")
    private Integer type;
    @ApiModelProperty(value = "操作id")
    private String operationId;
    @ApiModelProperty(value = "最大值,type为1时可以设置")
    private String maxValue;

    @ApiModelProperty(value = "设备类型id")
    private String deviceTypeId;
    @ApiModelProperty(value = "设备类型名称")
    @TableField(exist = false)
    private String deviceTypeName;
    @ApiModelProperty(value = "最小值type为1时可以设置")
    private String minValue;

    @ApiModelProperty(value = "type为零时可以设置")
    private String errorValue;

    @ApiModelProperty(value = "周1到周日数组")
    private String week;

    @ApiModelProperty(value = "用户id")
    private String userId;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
